package com.lovo.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * 描述代理对象的执行操作
 */
public class AdminControlInvocation implements InvocationHandler {
    private Object target;
    public AdminControlInvocation(Object target){
        this.target = target;
    }
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("进入"+method.getName()+"方法");
        return method.invoke(target);

    }
}
